extends "../yuekegongjue-3/yuekegongjue-3.gd"


var baseId = ""
var upText1 = "打捞触发几率+1%"
var upText2 = "回魂夜可多次施放(每次冷却20秒)"
func _extInit():
	._extInit()
	lv = 4             #等级的设置
	addSkill("<固化>战斗开始20秒时复活所有阵亡的[非召唤]友军", "回魂夜")

var skFlag = 0
func _upS():
	._upS()
	skFlag += 1
	if skFlag == 20:
		if upgraded == 2:
			skFlag = 0
		for i in deathChas:
			i.isDeath = false
			i.plusHp(i.att.maxHp)
			i.revive(i.att.maxHp)
			if sys.main.matCha(i.cell) != null:
				for tcell in utils.getAllCells(1):
					if sys.main.matCha(tcell) != null:
						i.setCell(tcell)
						break
		deathChas.clear()

func _onBattleEnd():
	._onBattleEnd()
	skFlag = 0
var p4 = 20
func upgrade():
	.upgrade()
	if upgraded == 1:
		p3 = 2